package com.qlm.controller;

import com.jfinal.core.Controller;
import com.qlm.cache.CacheManmager;
import com.qlm.cache.MsgCache;
import com.qlm.cache.RankCache;
import com.qlm.cache.ShopCache;
import com.qlm.service.ShopMgr;

public class CacheController extends Controller{

	public void updateGift(){
		ShopCache shopCache = CacheManmager.getObj("shop");
		shopCache.updateGift();
		renderText("ok");
	}
	
	public void updateImg(){
		ShopCache shopCache = CacheManmager.getObj("shop");
		shopCache.updateImg();
		shopCache.updateGift();
		renderText("ok");
	}
	
	public void yhq(){
		String openid = getPara("openid");
		int type = getParaToInt("type");
		ShopMgr.sendYhq(openid, type);
		renderText("ok");
	}
	
	public void updateMsg(){
		MsgCache.update();
		renderText("ok");
	}
	
	public void updateScore(){
		RankCache.update();
		renderText("ok");
	}
	
	public void updateDaili(){
		ShopCache.updateDaili();
		renderText("ok");
	}
}
